3.42 \(\int \cos ^2(c+d x) (B \sec (c+d x)+C \sec ^2(c+d x)) \, dx\)

Optimal. Leaf size=15 \[ \frac{B \sin (c+d x)}{d}+C x \]

[Out]

C*x + (B*Sin[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0319256, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.107, Rules used = {4047, 2637, 8} \[ \frac{B \sin (c+d x)}{d}+C x \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

C*x + (B*Sin[c + d*x])/d

Rule 4047

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(
C_.)), x_Symbol] :> Dist[B/b, Int[(b*Csc[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x
]^2), x] /; FreeQ[{b, e, f, A, B, C, m}, x]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=B \int \cos (c+d x) \, dx+\int C \, dx\\ &=C x+\frac{B \sin (c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.0087985, size = 26, normalized size = 1.73 \[ \frac{B \sin (c) \cos (d x)}{d}+\frac{B \cos (c) \sin (d x)}{d}+C x \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

C*x + (B*Cos[d*x]*Sin[c])/d + (B*Cos[c]*Sin[d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 21, normalized size = 1.4 \begin{align*}{\frac{B\sin \left ( dx+c \right ) +C \left ( dx+c \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x)

[Out]

1/d*(B*sin(d*x+c)+C*(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 0.935867, size = 27, normalized size = 1.8 \begin{align*} \frac{{\left (d x + c\right )} C + B \sin \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

((d*x + c)*C + B*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 0.468058, size = 38, normalized size = 2.53 \begin{align*} \frac{C d x + B \sin \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

(C*d*x + B*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (B + C \sec{\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**2*(B*sec(d*x+c)+C*sec(d*x+c)**2),x)

[Out]

Integral((B + C*sec(c + d*x))*cos(c + d*x)**2*sec(c + d*x), x)

________________________________________________________________________________________

Giac [B]  time = 1.17121, size = 53, normalized size = 3.53 \begin{align*} \frac{{\left (d x + c\right )} C + \frac{2 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

((d*x + c)*C + 2*B*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 + 1))/d